<template>
   <div class="new-products-header">
    <h2>{{ title }}</h2>
    <div class="flower-box">
      <div class="line"></div>
      <img src="@/assets/images/heading-banner-v1.png"
        alt="flower-img" class="flower-img">
      <div class="line"></div>
    </div>
    <p>{{ description }}</p>
  </div>
</template>

<script setup>
defineProps({
  title: {
    type: String,
    default: 'title'
  },
  description: {
    type: String,
    default: 'description'
  }
})
</script>

<style scoped>
.new-products-header {
  text-align: center;
  margin-bottom: 40px;
}
.new-products-header h2 {
  font-size: 28px;
  font-weight: 700;
  font-family: Montserrat;
  margin-bottom: 10px;
  color: #333;
}
.new-products-header p {
  font-family: Latop;
  font-size: 14px;
  color: #999;
  line-height: 1.6;
}
.flower-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0; /* 与上下元素拉开间距 */
}
.line {
  height: 1px;
  background-color: #BEAE59;
  flex: 1;
  max-width: 70px; /* 限制横线最大宽度 */
}

.flower-img {
  width: 20px;
  height: 20px;
  margin: 0 10px; /* 与横线之间的间距 */
  object-fit: contain; /* 保持图片比例，适应容器 */
}
</style>